package com.sicau.socialpracticesystem.common.myenum;

/**
 * 团队申请进度枚举
 *
 * @author sxt
 * @version : 1.0.0
 */
public enum TeamMemberRoleEnum {

    CAPTAIN(0, "队长"),
    MEMBER(1, "成员");

    TeamMemberRoleEnum(Integer role, String desc) {
        this.role = role;
        this.desc = desc;
    }

    /**
     * 进度类型
     */
    private final Integer role;

    /**
     * 进度描述
     */
    private final String desc;


    public Integer getRole() {
        return role;
    }


    public String getDesc() {
        return desc;
    }

    public static TeamMemberRoleEnum getEnum(Integer state) {
        TeamMemberRoleEnum[] collegeEnums = values();
        for (TeamMemberRoleEnum collegeEnum : collegeEnums) {
            if (collegeEnum.getRole().equals(state)) {
                return collegeEnum;
            }
        }
        return null;
    }
}
